Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Catch2 as installed #186

Merged
merged 3 commits into from
Jul 31, 2023
Merged

Conversation

pinotree
Copy link
Contributor

When building the tests, require and use Catch2 as installed in the system, rather than using an old embedded copy of it. This way, there is no risk it will stop working with newer versions of glibc/gcc/etc.

This also changes the nix packaging to disable tests & examples: they are not used in any way, so better disable them to avoid requiring bits only needed for them.

- the tests are not run or even built
- the examples are not installed
so it is better to simply disable them; this also avoids requiring
packages needed only for them.
In case the tests are enabled, require a system installed version of
Catch2:
- find it using its CMake config file
- use the Catch2::Catch2 CMake target
- switch the includes to the canonical form <catch2/catch.hpp>
- stop using the tools/include subdirectory in the include path

Also adapt the Nix configuration for this.
Now that the system version of Catch2 is used, the embedded copy is no
more needed.
@codecov-commenter
Copy link

Codecov Report

Merging #186 (417dcf4) into master (dd29870) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #186   +/-   ##
=======================================
  Coverage   94.78%   94.78%           
=======================================
  Files          81       81           
  Lines        2875     2875           
=======================================
  Hits         2725     2725           
  Misses        150      150           
Files Changed Coverage Δ
test/cereal/immer_array.cpp 100.00% <ø> (ø)
test/cereal/immer_box.cpp 100.00% <ø> (ø)
test/cereal/immer_flex_vector.cpp 100.00% <ø> (ø)
test/cereal/immer_vector.cpp 100.00% <ø> (ø)
test/cereal/tuple.cpp 100.00% <ø> (ø)
test/cereal/variant_with_name.cpp 100.00% <ø> (ø)
test/core.cpp 99.51% <ø> (ø)
test/cursor.cpp 99.02% <ø> (ø)
test/debug.cpp 100.00% <ø> (ø)
test/deps.cpp 100.00% <ø> (ø)
... and 20 more

@pinotree
Copy link
Contributor Author

hmm the build job fails, and it seems also failed after the last push; let's see whether #187 fixes that

@arximboldi arximboldi merged commit a2eceee into arximboldi:master Jul 31, 2023
6 of 7 checks passed
@pinotree pinotree deleted the system-catch2 branch July 31, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants